home *** CD-ROM | disk | FTP | other *** search
/ WWII Attack! from Pearl Harbor to Potsdam / WWII Attack - From Pearl Harbor to Potsdam - Disc 3.iso / pc / us / shared.cst / 00034_Script_34 < prev    next >
Text File  |  1999-11-23  |  1KB  |  57 lines

  1. on PrintText textString
  2.   
  3.   -- a Lingo script for printing an arbitrary quantity of text
  4.   -- using the PrintOMatic Xtra
  5.   
  6.   -- PARAMETERS:
  7.   -- textString is a string value, the text you want to print
  8.   
  9.   if the machineType = 256 then
  10.     put "arial" into printingFont
  11.     put "pmatic.dll" into XObjFile
  12.   else
  13.     put "helvetica" into printingFont
  14.     put "pmatic.xobj" into XObjFile 
  15.   end if
  16.   
  17.   openxlib XObjFile
  18.   put PrintOMatic(mnew) into printer
  19.   
  20.   if not objectP(printer) then
  21.     -- something went wrong, the Xtra was not instantiated
  22.     Alert "There is no currently selected printer. Printing features are disabled."
  23.   else
  24.     
  25.     -- register your Xtra here!
  26.      printer(mregister,"PMAT133-123-02039")
  27.     -- set the page margins
  28.     printer (mSetMargins,72,72,72,72)
  29.     
  30.     put printer (mGetPageWidth) into w
  31.     put printer (mGetPageHeight) into h
  32.     
  33.     printer (mSetTextFont,printingFont)
  34.     printer (mSetTextSize,10)
  35.     printer (mSetTextStyle,"normal")
  36.     
  37.     -- set up our first page and text box
  38.     printer (mNewPage)
  39.     printer (mTextBox,0,0,w,h,false)
  40.     
  41.     -- and place the appropriate text onto it
  42.     -- with the "autoAppend" parameter set to true
  43.     printer (mSetText, textString, true)
  44.     
  45.  --   if printer (mDoJobSetup) = true then
  46.   --    updateStage
  47.       printer (mPrint)
  48.  
  49.     
  50.     printer(mDispose)
  51.     
  52.   end if
  53.   
  54.   -- close the PrintOMatic Xtra
  55.   closexlib XObjFile
  56.   
  57. end printText